﻿using NUnit.Framework;

namespace PriceCalculator.Tests
{
  [TestFixture]
  public class CalcPriceWithExpectedDiscountsTwoSeries
  {
    [Test]
    public void TwoDifferentBooks()
    {
      var input = new[] { 2, 2 };
      var expected = 2 * 2 * 8.0 * 0.95;

      var result = Calculator.CalcPrice(input);

      Assert.That(result, Is.EqualTo(expected));
    }


    [Test]
    public void ThreeDifferentBooks()
    {
      var input = new[] { 2, 2, 2 };
      var expected = 2 * 3 * 8.0 * 0.90;

      var result = Calculator.CalcPrice(input);

      Assert.That(result, Is.EqualTo(expected));
    }

    [Test]
    public void FourDifferentBooks()
    {
      var input = new[] { 2, 2, 2, 2 };
      var expected = 2 * 4 * 8.0 * 0.80;

      var result = Calculator.CalcPrice(input);

      Assert.That(result, Is.EqualTo(expected));
    }

    [Test]
    public void FiveDifferentBooks()
    {
      var input = new[] { 2, 2, 2, 2, 2 };
      var expected = 2 * 5 * 8.0 * 0.75;

      var result = Calculator.CalcPrice(input);

      Assert.That(result, Is.EqualTo(expected));
    }



  }
}
